package com.honglang.service;

import java.util.List;

import org.springframework.transaction.annotation.Transactional;

import com.honglang.common.tools.Pager;
import com.honglang.entity.FileSys;

public interface FileSysService {

	/**
	 * save fileSys entities to database;
	 * @param realContextPath
	 * @param fileNameList
	 */
	@Transactional(readOnly = false)
	public void addFileSys(String realContextPath,List<String> fileNameList);
	
	
	/**
	 * get filesys by relativeUrl;
	 * @param relativeUrl
	 * @return
	 */
	@Transactional(readOnly = true)
	public FileSys getFileSysByRelativeUrl(String relativeUrl);
	
	
	/**
	 * delete filesys;
	 * @param fileSys
	 */
	@Transactional(readOnly = false)
	public void  deleteByRelativeUrl(FileSys fileSys);
	
	
	
	/**
	 * get non image filesys in page
	 * @param pageSize
	 * @param pageNo
	 * @return
	 */
	@Transactional(readOnly = true)
	public Pager getNonImageFileInPager(int pageSize,int pageNo);
	
	

	/**
	 * get by ID
	 * @param fileSysId
	 * @return
	 */
	@Transactional(readOnly = true)
	public FileSys getFileSys(Integer fileSysId);
	
	
	/**
	 * delete fileSys entity
	 * @param fileSys
	 */
	@Transactional(readOnly = false)
	public void delete(FileSys fileSys);
	
	
	/**
	 * get fileSys by fileSys Ids; like "1-10-22"
	 * @param fileSysIds
	 * @return
	 */
	@Transactional(readOnly = true)
	public List<FileSys> getFileSysByIds(String fileSysIds);
	
	
	/**
	 * batch delete fileSys
	 * @param fileSysList
	 */
	@Transactional(readOnly = false)
	public void delete(List<FileSys> fileSysList);
}
